Fix cluster edit for local cluster on refresh #15817
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #15797
Occurred changes and/or fixed issues
With some changes to support scalability, we no longer fetch all mgmt clusters in the UI early on.
It turns out that the cluster edit page for the local cluster (when loaded via page refresh) has a bug where it assumes the mgmt cluster information is available.
This PR fixes this bug.
Technical notes summary
Although the cluster edit page fetches the mgmt clusters, there is code in the
datamethod which calculatessubType. Unfortunately,dataruns beforefetch, so if the mgmt clusters have not already been loaded, then thedatamethod will incorrectly calculatesubType.The fix is easy - move the calculation of
subTypefrom thedatamethod tofecth. This ensures it occurs after the mgmt clusters have been fetched.Areas or cases that should be tested
Go the cluster edit page for the
localcluster.Hit refresh on the browser.
Make sure you get the Vue page and not the Ember page.
Screenshot/Video
Vue screen that you should now see:
Ember screen that is shown on refresh before the fix in this PR:
Checklist
Admin,Standard UserandUser Base